package com.zang.blogz.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 定时任务调度表
 * </p>
 *
 * @author 朵橙i
 * @since 2022-09-04
 */
@Getter
@Setter
@TableName("tb_job")
@ApiModel(value = "Job对象", description = "定时任务调度表")
public class Job implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("任务ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("任务名称")
    @TableField("job_name")
    private String jobName;

    @ApiModelProperty("任务组名")
    @TableField("job_group")
    private String jobGroup;

    @ApiModelProperty("调用目标字符串")
    @TableField("invoke_target")
    private String invokeTarget;

    @ApiModelProperty("cron执行表达式")
    @TableField("cron_expression")
    private String cronExpression;

    @ApiModelProperty("计划执行错误策略（1立即执行 2执行一次 3放弃执行）")
    @TableField("misfire_policy")
    private Integer misfirePolicy;

    @ApiModelProperty("是否并发执行（0允许 1禁止）")
    @TableField("concurrent")
    private Integer concurrent;

    @ApiModelProperty("状态（0正常 1暂停）")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date createTime;

    @ApiModelProperty("更新时间")
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date updateTime;

    @ApiModelProperty("备注信息")
    @TableField("remark")
    private String remark;


}
